﻿@using GoodMan.Infrastructure.Entities.Entity;
@using GoodMan.Infrastructure.Entities.Enum;

@{
    ViewBag.Title = "用户列表";
    Layout = "~/Areas/WorkSpace/Views/Shared/_CollegeAdminTemplete.cshtml";
    ItemListBox<User> list = ViewBag.UserList;
}


<div id="content-header">
    <h1>
        人员信息</h1>
</div>
<div id="breadcrumb">
    <a href="index.html" title="Go to Home" class="tip-bottom"><i class="icon-home"></i>
        首页</a> <a href="/workspace/collegeadmin/UserInfoList" class="tip-bottom">人员管理</a> <a href="/workspace/collegeadmin/UserInfoList"
            class="current">信息列表</a>
</div>
<div class="container-fluid">
    <div class="row-fluid">
        <div class="span12">
            <div class="widget-box">
                <div class="widget-title">
                    <h5>
                        信息列表</h5>
                </div>
                <div class="widget-content nopadding">
                    <table class="table table-bordered data-table">
                        <thead>
                            <tr>
                                <th>
                                    序号
                                </th>
                                <th>
                                    用户名
                                </th>
                                <th>
                                    角色
                                </th>
                                <th>
                                    昵称
                                </th>
                                <th>
                                    真实姓名
                                </th>
                                <th>
                                    身份证号
                                </th>
                                <th>
                                    性别
                                </th>
                                <th>
                                    联系方式
                                </th>
                                <th>
                                    是否禁用
                                </th>
                                <th>
                                    操作
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            @{
                                if (list != null && list.Data != null && list.Data.Count != 0)
                                {
                                    int index = 0;
                                    foreach (var item in list.Data)
                                    {
                                        index++;
                                <tr class="gradeX">
                                    <td style="width: 10px;">@index
                                    </td>
                                    <td>
                                        @item.UserName
                                    </td>
                                    <td>@item.SystemRole.Mapping()
                                    </td>
                                    <td>@item.NickName
                                    </td>
                                    <td>@item.RealName
                                    </td>
                                    <td>@item.IdCardNo
                                    </td>
                                    <td>@item.Gender.Mapping()
                                    </td>
                                    <td>
                                        <span title="QQ:@item.QQ " style="cursor:pointer">电话:@item.Phone</span>
                                    </td>
                                    <td>
                                        @{if (!item.IsRefuse)
                                          {
                                            <span>正常</span>}
                                          else
                                          {
                                            <span>禁用</span>}}
                                    </td>
                                    <td class="center" style="min-width: 200px;">
                                     <a href="/workspace/collegeadmin/UserInfo?u=@item.UserName&r=1" title="查看详细"  class="btn btn-primary btn-mini">详情</a>
                                         @{if (!item.IsRefuse)
                                           {
                                            <a href="/workspace/collegeadmin/modifystatu?u=@item.UserName&page=@list.CurrentPage&s=1&r=1"  class="btn btn-primary btn-mini">
                                                禁用</a>}
                                           else
                                           {
                                            <a href="/workspace/collegeadmin/modifystatu?u=@item.UserName&page=@list.CurrentPage&s=0&r=1"  class="btn btn-primary btn-mini">
                                                启用</a>}}
                                    </td>
                                </tr>
                                    }

                                }
                                else
                                {
                                <tr >
                                    <td style="width: 10px;" colspan="10" align="center"><span>没有找到任何数据</span></td></tr>
                                }
                            }
                        </tbody>
                    </table>
                </div>
                @Html.Raw(list.PageItemSegment)
            </div>
        </div>
    </div>
</div>
@section tail{
    <script type="text/javascript">
        $(function () {
            $('#likUser').addClass('open');
            $('#likUser').addClass('active');
        });
    </script>
}

